package com.yc.navy.blog.blog.vo;

import com.yc.navy.blog.blog.enums.ResultEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@Data
@Builder
@NoArgsConstructor
public class ResultVo {
    private Integer code;
    private String msg;
    private Object data;

    public ResultVo(ResultEnum enums){
        this.code=enums.getCode();
        this.msg=enums.getMsg();
    }

    public ResultVo(ResultEnum enums,Object data){
        this.code=enums.getCode();
        this.msg= enums.getMsg();
        this.data=data;
    }
}
